Skip to content

feat: Add mentee review api with approve/reject#598

Merged
dricazenck merged 6 commits intomainfrom
feat/admin-mentee-review-api
Apr 6, 2026
Merged

feat: Add mentee review api with approve/reject#598
dricazenck merged 6 commits intomainfrom
feat/admin-mentee-review-api

Conversation

@dricazenck
Copy link
Copy Markdown
Collaborator

@dricazenck dricazenck commented Apr 4, 2026

Summary

  • Approve now changes the mentee's profile status to ACTIVE (was: only changed application status to MENTOR_REVIEWING)
  • Reject now changes the mentee's profile status to REJECTED AND rejects all pending applications
  • List mentees now only returns active mentees

Related Issue

closes #434

Change Type

  • Bug Fix
  • New Feature
  • Code Refactor

Screenshots

image

Pull request checklist

Please check if your PR fulfills the following requirements:

Introduce three new admin endpoints under MENTEE_APPROVE permission:
GET /mentees/applications/review returns enriched priority-1 PENDING
applications for admin review; PATCH /mentees/{id}/approve promotes the
priority-1 application to MENTOR_REVIEWING; PATCH /mentees/{id}/reject
rejects all PENDING applications for a mentee. Adds repository query
methods findByStatusAndPriorityOrder and findPendingByMenteeId backed by
new SQL queries, plus MenteeApplicationReviewDto combining application
and mentee profile data. Unit and integration tests included.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
platform-admin Ignored Ignored Apr 4, 2026 2:51pm

@dricazenck dricazenck changed the title feat: Add admin mentee review endpoints with approve/reject by mentee ID feat: Add mentee review api with approve/reject Apr 4, 2026
The enum used 4-space indentation with closing braces on their own
lines, inconsistent with the rest of the codebase which follows
Google Java Format (2-space indent, fields and methods at the same
level as the enum body). This reformats the file to match the
enforced style so it no longer diffs noisily against auto-formatted
code. No functional change.
@dricazenck dricazenck marked this pull request as ready for review April 6, 2026 20:22
@dricazenck dricazenck requested a review from a team as a code owner April 6, 2026 20:22
MenteeApplicationReviewDto was left over from an earlier design
iteration and had no callers; removing it prevents confusion for
future contributors. Also replace List.get(0)/get(1) with
getFirst()/getLast() in the integration test to align with the
Java 21 style used elsewhere in the codebase.
Copy link
Copy Markdown
Contributor

@womencodingcommunity womencodingcommunity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this PR! The mentee review workflow is correctly implemented and the architecture is clean.

What stands out:

  • Extracting admin operations into MenteeAdminService is the right call — clean SRP with no production @SuppressWarnings needed.
  • activateMentee and rejectMentee both use @Transactional and do a pre-flight findById check, giving a clear 404 instead of a silent no-op if the mentee is not found.
  • The cascade rejection of all pending applications when rejecting a mentee is exactly the right behaviour.
  • Integration tests cover priority ordering, status-filtering edge cases, and empty states — solid coverage.

All review findings were addressed before merge: the unused MenteeApplicationReviewDto leftover was deleted and List.get(0)/get(1) was replaced with Java 21 getFirst()/getLast() in the integration test. ✅

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 6, 2026

@dricazenck dricazenck merged commit 443dc55 into main Apr 6, 2026
8 checks passed
@dricazenck dricazenck deleted the feat/admin-mentee-review-api branch April 6, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: [frontend] Mentor Dashboard (Mentor view)

3 participants